{% extends 'dashboard.html' %}

{% block content %}
    <div class="right_col" role="main" xmlns="http://www.w3.org/1999/html">
          <div class="">

            <div class="col-md-12 col-sm-12 col-xs-12">
              <div class="x_panel">
                  <div class="x_title">
                    <h2>慢查询数据库：<small>{{ dbconfig.name }}</small></h2>
                      <ul class="nav navbar-right panel_toolbox">
                          <li><button type="button" class="btn btn-info btn-sm" onclick="{location.href='{{ url_for('slowlog') }}'}">返回</button></li>
                      </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                      <div class="form-group">
                        <div id='result' class='col-md-12 col-sm-12 col-xs-12'>
                            <table class='table'>
                                <thead>
                                    <tr>
                                        <th class='col-md-1 col-sm-1 col-xs-12'>ID</th>
                                        <th class='col-md-8 col-sm-8 col-xs-12'>慢查询sql</th>
                                        <th class='col-md-3 col-sm-3 col-xs-12'>计数</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {% for row in slowloglist %}

                                    <tr>
                                        <td class='col-md-1 col-sm-1 col-xs-12'>{{ loop.index }}</td>
                                        <td class='col-md-8 col-sm-8 col-xs-12'>{{ row.0 }}</td>
                                        <td class='col-md-3 col-sm-3 col-xs-12'>{{ row.1 }}</td>

                                    </tr>
                                     {% endfor %}
                                </tbody>
                            </table>

                      </div>

                  </div>
                  </div>
              </div>

          </div>
        </div>
    </div>
        <!-- /page content -->
{% endblock %}